// Redis 客户端
// clients/redis.js
const Redis = require("ioredis");
const redisClient = new Redis(process.env.REDIS_URL);

// 连接事件监听
redisClient.on("connect", () => {
  console.log("Redis 连接成功");
});

redisClient.on("error", (err) => {
  console.error("Redis 连接失败:", err);
});

module.exports = redisClient;